#-------------------------------------------------
#
# Project created by QtCreator 2019-11-16T14:05:00
#
#-------------------------------------------------

QT       += core gui dbus widgets network KWindowSystem

TARGET = ukui-sidebar
TEMPLATE = app
CONFIG += c++11 link_pkgconfig
PKGCONFIG += gsettings-qt kysdk-waylandhelper

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_MESSAGELOGCONTEXT

include(./plugin-interface/plugin-interface.pri)
include(./plugin-signals/plugin-signals.pri)
include(env.pri)

DEFINES += PLUGIN_INSTALL_DIRS='\\"$${PLUGIN_INSTALL_DIRS}\\"'

RESOURCES  += sidebar.qrc
SOURCES += \
        commondata.cpp \
        dataprocess.cpp \
        dbusmanager.cpp \
        gsettingmanager.cpp \
        kuploadmessage/kuploadmessage.cpp \
        main.cpp \
        mostgrandwidget.cpp \
        sidebarDbusService.cpp \
        qtsingleapplication.cpp \
        qtlockedfile.cpp \
        qtlocalpeer.cpp \
        widget.cpp

INCLUDEPATH += ./plugin-interface \
               ./plugin-signals \
               /usr/include/dconf

HEADERS += \
        commondata.h \
        dataprocess.h \
        dbusmanager.h \
        gsettingmanager.h \
        kuploadmessage/kuploadmessage.h \
        kuploadmessage/uploadPluginInterface.h \
        mostgrandwidget.h \
        sidebarDbusService.h \
        qtsingleapplication.h \
        qtlockedfile.h \
        qtlocalpeer.h \
        widget.h

INCLUDEPATH +=./plugin-interface ./plugin-sub-manager
TRANSLATIONS += ../translations/ukui-sidebar_bo.ts \
                ../translations/ukui-sidebar_tr.ts \
                ../translations/ukui-sidebar_zh_CN.ts

unix {
    translation.path = /usr/share/ukui-sidebar/
    translation.files += ../translations/*.qm
    INSTALLS += translation
}

CONFIG += link_pkgconfig

PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0
LIBS += -lX11 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lukui-log4qt -ldconf -ldl -lcrypto
LIBS += -L/usr/lib/kysdk/kysdk-base/

desktopfile.files = data/ukui-sidebar.desktop
desktopfile.path = /etc/xdg/autostart/

schemes.files += data/org.ukui.log4qt.ukui-sidebar.gschema.xml
schemes.path = /usr/share/glib-2.0/schemas/

# Default rules for deployment.
target.path = /usr/bin/
!isEmpty(target.path): INSTALLS += target

INSTALLS += desktopfile schemes

DISTFILES += \
    env.pri
